From 193b957f98fc9592c3b9b8b7b419ee6e58c4c492 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 18 Jul 2005 20:16:37 +0000 Subject: [PATCH] Correct reads of gpx 'fix' value. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1291 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/gpx.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gpsbabel/gpx.c b/gpsbabel/gpx.c index f07198a45..36cdb8493 100644 --- a/gpsbabel/gpx.c +++ b/gpsbabel/gpx.c @@ -837,7 +837,17 @@ gpx_end(void *data, const char *el) wpt_tmp->sat = atof(cdatastrp); break; case tt_fix: - wpt_tmp->fix = atof(cdatastrp); + wpt_tmp->fix = atoi(cdatastrp)-1; + if ( wpt_tmp->fix < fix_2d) { + if (!strcasecmp(cdatastrp, "none")) + wpt_tmp->fix = fix_none; + else if (!strcasecmp(cdatastrp, "dgps")) + wpt_tmp->fix = fix_dgps; + else if (!strcasecmp(cdatastrp, "pps")) + wpt_tmp->fix = fix_pps; + else + wpt_tmp->fix = fix_unknown; + } break; case tt_unknown: end_something_else(); -- 2.30.2